package command;

import elements.Robot;
import roborally.Entry;

/**
 * A class representing a command.
 * 
 * @version	3.0
 * @author 	Lies Tambeur 	r0264469	2Bcwsbbh
 * @author	Eline Vanrykel	r0264543	2Bcwselt
 */
public abstract class Command extends Entry {
	/**
	 * Execute the command for the given robot.
	 * @param 	robot
	 * 			The robot the command will be executed on.
	 */
	public abstract void execute(Robot robot);
	/**
	 * The command will be executed until the first BasicCommand is executed.
	 * @param 	robot
	 * 			The robot the command will be executed on.
	 * @return	true if there is a BasicCommand executed, false otherwise.
	 */
	public abstract boolean executeSingleStep(Robot robot);
	/**
	 * Returns alreadyExecuted.
	 * @return	alreadyExecuted
	 */
	public boolean isAlreadyExecuted() {
		return alreadyExecuted;
	}
	/**
	 * Sets alreadyExecuted on the given parameter.
	 * @param 	alreadyExecuted
	 * 			the boolean alreadyExecuted will be set on.
	 */
	public abstract void setAlreadyExecuted(boolean alreadyExecuted);
	/**
	 * Reflecting if the command is totally finished, so every single step is executed.
	 */
	protected boolean alreadyExecuted = false;
}
